<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
	<title>Remove Student</title>
</head>

<body>
	<?php
		$ini_array = parse_ini_file("../config1.ini");
		@ $con = mysql_pconnect($ini_array['dblink'], $ini_array['dbuser'], $ini_array['dbpass']);
					
		//$nameCookie = $_COOKIE['Studial'];
		$CourseID = $_GET['CourseID'];
		$Username = $_GET['Username'];
				
		if (!$con)
		{
			die('Could not connect: ' . mysql_error());
		}
				
		@ mysql_set_charset('utf8');
		
		@ mysql_select_db($ini_array['dbname']);
		
		$query = "DELETE FROM `Studial`.`users` WHERE Username = '".$Username."' AND CourseID = '".$CourseID."'";
		$tempmovies = mysql_query($query);
		
    	header('location: ../login/deletecookies.php');
    ?>
</body>
</html>